fix: invalid username or repos, timeout error #22#23
fix: invalid username or repos, timeout error #22#23klee214 wants to merge 1 commit intoaemmadi:masterfrom
Conversation
There was a problem hiding this comment.
Good change! This solves the application crashing issue, but users are now presented with a Cannot GET /docs/:user/:repo text. This is the default http error when trying to GET something that doesn't exist.
If you can, try to redirect to a 404 page so it doesn't disturb the user experience as much!
EDIT: Follow this and edit the $window.docsify object in the /docs/index.html file. Make a 404.md in the docs/ folder. That should work, let me know if you have any trouble!
|
Sure! I will give it a shot! |
|
Hi again, regarding this issue, I have realized something. Because we redirect to the certain URL In this case, we can show empty website with 404-page error message(I don't know where the error message came from) -cannot use Another is we can add |
Fixes #22 I put the
axiosrequest in thetry catchblock, so if the username or repos name is invalid, it will simply go catch block then finish thegetReadme()function. So far, when users put wrong names, it will just normal 'cannot get message'.I don't know how to specifically do i need to change for this (either simply redirect to the home page or make a 404 page), so please let me know if there is anything I can help more!!